/**
 * A class used to help interpretation
 * Helps carry the if, loop and other char counts
 * Contains operations to return the counts as well as the total char count
 * @author sean
 *
 */
public class CharCountContainer {
	
	private int loopCharCount;
	private int ifCharCount;
	private int otherCharCount;
	
	public CharCountContainer() {
		
	}
	
	public void setLoopCharCount (int loopCharCount) {
		this.loopCharCount = loopCharCount;
	}
	
	public void setIfCharCount (int ifCharCount) {
		this.ifCharCount = ifCharCount;
	}
	
	public void setOtherCharCount (int otherCharCount) {
		this.otherCharCount = otherCharCount;
	}
	
	public int getLoopCharCount () {
		return loopCharCount ;
	}
	
	public int getIfCharCount () {
		return ifCharCount ;
	}
	
	public int getOtherCharCount () {
		return otherCharCount ;
	}
	
	public int getTotalCharCount () {
		return loopCharCount + ifCharCount + otherCharCount;
	}
	
	/**
	 * Combines 2 containers by taking the sum of the current container and other container's
	 * loop count, char count and other count
	 * @param container2 The second container used to take the sum of
	 */
	public void combine(CharCountContainer container2) {
		setLoopCharCount(container2.getLoopCharCount() + loopCharCount);
		setIfCharCount(container2.getIfCharCount() + ifCharCount);
		setOtherCharCount(container2.getOtherCharCount() + otherCharCount);
	}

}
